<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>智能应答 - 中国移动通信</title>
<link href="../ext-3.4.0/resources/css/ext-all.css" type="text/css" rel="stylesheet" />
	<script language="javascript" src="../ext-3.4.0/adapter/ext/ext-base.js"></script>
<script language="javascript"  src="../ext-3.4.0/src/locale/ext-lang-zh_CN.js"></script>
<script language="javascript" src="../ext-3.4.0/ext-all.js" ></script>
<script typt="text/javascript" src="ext/ext-lang-zh_CN.js"></script>
</head>
<script>
	Ext.onReady(function() {

		// grid start
			var cm = new Ext.grid.ColumnModel( [ {
				header : '编号',
				dataIndex : 'id'
			}, {
				header : '名称',
				dataIndex : 'name'
			}, {
				header : '描述',
				dataIndex : 'descn'
			} ]);

			var data = [ [ '1', 'name1', 'descn1' ],
					[ '2', 'name2', 'descn2' ], [ '3', 'name3', 'descn3' ],
					[ '4', 'name4', 'descn4' ], [ '5', 'name5', 'descn5' ] ];

			var ds = new Ext.data.Store( {
				proxy : new Ext.data.MemoryProxy(data),
				reader : new Ext.data.ArrayReader( {}, [ {
					name : 'id'
				}, {
					name : 'name'
				}, {
					name : 'descn'
				} ])
			});
			ds.load();

			var grid = new Ext.grid.GridPanel( {					
				ds : ds,
				cm : cm,
				collapsible : true,
				title : '列表',
				region : 'north'
			});
			// grid end

			// tree start
			var tree = new Ext.tree.TreePanel( {
				loader : new Ext.tree.TreeLoader( {
					dataUrl : '33.txt'
				}),
				title : '树',
				region : 'west',
				split : true,
				border : true,
				//collapsible : true,
				width : 120,
				minSize : 80,
				maxSize : 200
			});

			var root = new Ext.tree.AsyncTreeNode( {
				text : '偶是根'
			});
			tree.setRootNode(root);
			root.expand();
			// tree end
			// form start
			var form = new Ext.form.FormPanel( {
				defaultType : 'textfield',
				labelAlign : 'right',
				title : 'form',
				labelWidth : 50,
				frame : true,
				width : 220,
				collapsible : true,
				split : true,
				title : '表单',
				region : 'center',

				items : [ {
					fieldLabel : '文本框'
				} ],
				buttons : [ {
					text : '按钮'
				} ]
			});
			// form end

		

			// layout start
			var viewport = new Ext.Viewport( {				
				layout : 'border',
				items : [ {
					region : 'north',
					contentEl : 'north-div',
					split : true,
					border : true,
					collapsible : true,
					height : 30,
					minSize : 30,
					maxSize : 80,
					bodyStyle : 'background-color:#BBCCEE;'
				}, {
					region : 'south',
					contentEl : 'south-div',
					height : 20,
					bodyStyle : 'background-color:#BBCCEE;'
				}, tree, {
					region : 'center',
					split : true,
					border : true,
					collapsible : true,
					layout : 'border',
					items : [ grid,form ]
				} ]
			});
			// layout end
		});
</script>
</head>
<body>

<div id="north-div">预留区</div>
<div id="south-div">预留区</div>
</body>
</html>
</html>
